package com.takeoff.bluewhale.controller.v1;

import com.takeoff.bluewhale.service.User2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.takeoff.bluewhale.model.Response;
import com.takeoff.bluewhale.model.vo.UserVo;

@RestController
@RequestMapping("/v1")
public class UserController {
    
    @Autowired
    private User2Service user2Service;
//	@Autowired
//	private Use

    @GetMapping("home")
	public Object home() {
//        System.out.println("hhh");
		return Response.success(user2Service.list());
	}

    @GetMapping("/test")
	public Object testString() {
		return Response.success(new UserVo("haha"));
	}
}
